//
//  WCAccessoryView.m
//  WC
//
//  Created by wsj2015 on 16/1/17.
//  Copyright © 2016年 ShanghaiCize Trade And Business Co., Ltd. All rights reserved.
//

#import "WCAccessoryView.h"

@implementation WCAccessoryView
{
    UILabel *_label;

}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        UILabel *label =[[UILabel alloc] initWithFrame:CGRectMake(0, 0, frame.size.width -20, 22)];
        label.font = [UIFont systemFontOfSize:16];
        label.textColor =[UIColor whiteColor];
        label.backgroundColor =[UIColor redColor];
        label.textAlignment = NSTextAlignmentCenter;
        label.layer.cornerRadius = 10;
        label.text =@"new";
        label.layer.masksToBounds = YES;
        label.hidden = YES;
        [self addSubview:label];
        _label = label;
        UIImageView *imageView =[[UIImageView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(label.frame) +6, 3, 17, 17)];
        imageView.image = [UIImage imageNamed:@"indicator_v"];
        [self addSubview:imageView];
        
    }
    return self;
}
 -(void)setIsShow:(BOOL )isShow
{
    _isShow = isShow;
    _label.hidden = !isShow;

}
@end
